import { request } from '../request/request.js'
// 获取社区分享
export const PostcommunityInfo = (itemFrom) => {
    return request.post('/communityInfo',itemFrom);
}
// 获取社区分类
export const GetcommitIndex = () => {
    return request.get('/index');
}
// 社区分享查询详情
export const Postdetail = (detailId) =>{
	return request.post(`/communityInfo/detail?comment_id=${detailId}`)
}
// 用户点赞和取消点赞
export const PostLike=(detailId)=>{
	return request.post(`/communityInfo/like?comment_id=${detailId}`)
}

// 用户收藏和取消收藏
export const PostCollect=(detailId)=>{
	return request.post(`/communityInfo/collect?comment_id=${detailId}`)
}
// 用户查看自己的收藏
export const GetMyCollect=()=>{
	return request.get(`/communityInfo/checkCollectComment`)
}
// 用户查看自己的点赞
export const GetMyLike=()=>{
	return request.get(`/communityInfo/checkLikeComment`)
}
// 用户查看自己发布的社区分享
export const GetMyCommit = () =>{
	return request.get(`/communityInfo/userShare`)
}
// 用户发表社区分享
export const PostShareMyCommit = (itemFrom) =>{
	return request.post(`/communityInfo/userShare`,itemFrom)
}
// 用户删除自己的社区分享
export const DeleteMyCommit = (commentId) =>{
	return request.delete(`/communityInfo/userShare?comment_id=${commentId}`)
}
// 修改社区分享
export const PutFixMyCommit = (itemFrom) =>{
	return request.put(`/communityInfo/userShare`,itemFrom)
}
// 发布活动绑定用户购买的旅游商品数据回显
export const GetshopEcho = (theme_id) =>{
	return request.get(`/communityInfo/userShare/shopEcho?theme_id=${theme_id}`)
}

